//
//  LXOrderWayView.m
//  跑跑快销
//
//  Created by linxian on 14-5-9.
//  Copyright (c) 2014年 ylife. All rights reserved.
//

#import "LXOrderWayView.h"

@implementation LXOrderWayView
@synthesize cashImg, creditImg, commentTV;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self createUI];
    }
    return self;
}

-(void)createUI
{
    int navBarY,navBarH;
    
    if (ISDEVICE7) {
        navBarY = 0;
        navBarH = 64;
    }else{
        navBarY = 20;
        navBarH = 44;
    }
    _navBarH = navBarH;
    _navBarY = navBarY;
    
    // 2个按钮
    ///  现金
    UIButton *cashBtn = [[UIButton alloc] initWithFrame:CGRectMake(30, _navBarY+40, 30, 30)];
    cashBtn.backgroundColor = [UIColor redColor];
    [cashBtn setTitle:@"现金" forState:UIControlStateNormal];
    [self addSubview:cashBtn];
    UILabel *xianjin = [[UILabel alloc] initWithFrame:CGRectMake(80, _navBarY+40, 260, 30)];
    xianjin.text = @"现金";
    [self addSubview:xianjin];
    
    /// 赊销
    UIButton *creditBtn = [[UIButton alloc] initWithFrame:CGRectMake(160, _navBarY+40, 30, 30)];
    creditBtn.backgroundColor = [UIColor redColor];
    [creditBtn setTitle:@"赊销" forState:UIControlStateNormal];
    [self addSubview:creditBtn];
    UILabel *shexiao = [[UILabel alloc] initWithFrame:CGRectMake(200, _navBarY+40, 260, 30)];
    shexiao.text = @"赊销";
    [self addSubview:shexiao];
    
    // 评论框
    UILabel *beizhu = [[UILabel alloc] initWithFrame:CGRectMake(30, _navBarY+100, 260, 40)];
    beizhu.text = @"订单备注：";
    [self addSubview:beizhu];
    
    commentTV = [[UITextView alloc] initWithFrame:CGRectMake(30, _navBarY+140, 260, 150)];
    commentTV.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:commentTV];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
